package com.dongwq

class Song implements Comparable<Song> {

	String title
	Integer duration

	static constraints = {
		title(blank:false)
		duration(min:1)
	}

	@Override
	public int compareTo(Song o) {
		return this.title <=> o.title;
	}
}
 